package cn.jiadakeji.parent.mapper;

import cn.jiadakeji.parent.domain.Customer;
import cn.jiadakeji.parent.domain.CustomerParentPart;
import cn.jiadakeji.parent.dto.CustomerParentPartDTO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @Entity cn.jiadakeji.parent.domain.CustomerParentPart
 */
@Mapper
public interface CustomerParentPartMapper extends BaseMapper<CustomerParentPart> {

    @Select("select * from customer_parent_part where customer_id = #{customerId}")
    CustomerParentPart getCustomerParent(String customerId);

    CustomerParentPart selectOneById(@Param("id") String id);

    CustomerParentPart selectOneByCustomerId(@Param("customerId") String customerId);

    CustomerParentPartDTO selectOneByOpenId(CustomerParentPart customerParentPart);

    CustomerParentPartDTO getCustomerParentPart(Customer customer);
}




